﻿using Com.JunCaiSoft.Common.Dao;
using Com.JunCaiSoft.Permission.Entity;
using Com.JunCaiSoft.Permission.IDao;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Threading.Tasks;

namespace Com.JunCaiSoft.Permission.Dao
{
    public class UserDao : CoreDALAsync<User>, IUserDao
    {
        public UserDao(DbContext context) : base(context)
        {

        }

        public DbContext dbContext { get { return baseContext; } }

        public override async Task<User> GetAsync(object id)
        {
            var one = baseContext.Set<User>().Find(id);
            return await Task.Run(()=> one);
        }
    }
}
